<template>
    <div>
       <button @click="use">下载</button>
       <div class="box" v-show="flag">
            <dark ref="print" ></dark>
       </div>
    </div>
</template>

<script>
    import dark from '@/components/HelloWorld'
    export default {
        components: {
            dark,
        },
        data() {
            return {
                flag: false
            }
        },
        methods: {
            use() {
                this.flag = !this.flag
                // this.$refs.print.downPdf()
            }
        },
    }
</script>

<style scoped>

</style>